package integration.properties.message.impl;

import integration.dom.Message;
import integration.properties.message.MessageFormat;

public  abstract class AbstractMessageFormat implements MessageFormat {

    @Override
    public Message format(Message message) {
        System.out.println("Formatting message " +message+" using " + toString());
        message.setMessageFormat(toString());
        return message;
    }

    @Override
    public Message unformat (Message message) {
        System.out.println("Unformatting message using: " + toString());
        message.setMessageFormat(null);
        return message;
    }

    @Override
    public boolean isSameFormatOf(Message message) {
        System.out.println("Performing magic to determine if this message is formatted using " + toString());
        return false;
    }
}
